#!/usr/bin/python3
# -*- coding: utf-8 -*-
"""
Attributes:
    __version__ (str): "0.0.1"
    __copyright__ (str): "Copyright (C) 2025 z"
    __license__ (str): "MIT"
    __author__ (str): "Z"
"""

from kafka import KafkaConsumer

# 连接到Kafka集群，指定topic
consumer = KafkaConsumer('test_20181105', bootstrap_servers=['172.29.126.221:9092', '172.19.149.222:9092', '172.29.126.223:9092'])
# 消费消息
for message in consumer:
    print(message.value)
